var obj = null;
function butt(self){
	$("add-buttom").style.background = "#8CBF26";
	$("update-buttom").style.background = "#8CBF26";
	$("delete-buttom").style.background = "#8CBF26";
	self.style.background = "#A200FF";
	if (self.innerHTML == "修改") {
		$("operatetext").value = "update";
		$("edit-text-min").disabled = false;
		$("edit-text-min").value = "";
	}else if(self.innerHTML == "删除"){
		$("operatetext").value = "delete";
		$("edit-text-min").disabled = true;
		$("edit-text-min").value = "";
	}else if(self.innerHTML == "增加"){
		$("operatetext").value = "add";
		$("edit-text-min").disabled = true;
		$("edit-text-min").value = "";
	}
	obj = self;
}
function show(self){
	$("add-buttom").style.background = "#8CBF26";
	$("update-buttom").style.background = "#8CBF26";
	$("delete-buttom").style.background = "#8CBF26";
	self.style.background = "#A200FF";
	if(obj != null){
		obj.style.background = "#A200FF";
	}
}
function noshow(self){
	$("add-buttom").style.background = "#8CBF26";
	$("update-buttom").style.background = "#8CBF26";
	$("delete-buttom").style.background = "#8CBF26";
	if(obj != null){
		obj.style.background = "#A200FF";
	}
}
function sub(){
	var d=new Date();
	$("times").value = d.getTime();
	if ($("edit-text-max").value.replace(/ */,"").length > 0) {
		if($("operatetext").value == "update" && $("edit-text-min").value.replace(/ */,"").length > 0){
			$("augment").submit();
		}else if ($("operatetext").value != "update"){			
			$('augment').submit();
		}
		
	};
	
}
function oseng(formid,val,messageid,typeid){
	$('messageid').value = messageid;
	$('goodbay').value = val;
	$('typeid').value = typeid;
	acc = formid;
	submitFormByAjax('assess');
}
function eseng(formid,messageid,examineval){
	$('messageid1').value = messageid;
	$('examineval').value = examineval;
	acc = formid;
	submitFormByAjax('examine');
}